<template>
    <!-- 返回上一页 -->
    <div class="go-back">
        <header @click="goBack">
            <van-icon name="arrow-left" />
            <span>返回首页</span>
        </header>
    </div>
</template>
<script lang='ts' setup>
import { useRouter } from 'vue-router';
const $router = useRouter();
const goBack = () => {
    $router.push({ path: '/home/category' });
}


</script>
<style lang="less" scoped>
@import '../static/less/variable.less';

.go-back {
    width: 100%;
    margin-bottom: 10px;
    padding-bottom: 30px;

    header {
        width: 100%;
        height: 60px;
        line-height: 60px;
        background-color: @bgColor;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 999;

        .van-icon {
            font-size: 25px;
            display: inline-block;
            vertical-align: middle;
        }
        span{
            font-size: 18px;
            vertical-align: middle;
        }
    }

}
</style>